package
{
	import flash.utils.ByteArray;
	import flash.utils.Endian;
	import com.golden.GoldenWebSocket;
	
	public class FGS18Client extends GoldenWebSocket
	{
		public var commandPop:Array = [];

		public function FGS18Client(dump:Boolean = false)
		{
			//---------------------------------------------------------------------------
			encryptCode = [0xED, 0xFD, 0x5D, 0x76, 0x87, 0xCF, 0x85, 0xEC, 0x83, 0xBE, 0x3, 0x98, 0xC1, 0xDC, 0x65, 0xF4, 0x87, 0x52,
				0x42, 0x86, 0x6C, 0x34, 0xB1, 0x25, 0xD4, 0x5A, 0x1F, 0xF3, 0x51, 0x5A, 0xC2, 0xD7, 0xD4, 0xBA, 0x59, 0x86, 0x92, 0xAC,
				0x33, 0xD3, 0x63, 0xAA, 0x4E, 0xAD, 0x49, 0x4A, 0xF5, 0xCE, 0xE6, 0xE4, 0x9F, 0x61, 0x91, 0x54, 0x75, 0x4E, 0xC, 0xA6,
				0xE3, 0xB9, 0x9C, 0xD3, 0x5A, 0x8D, 0x10, 0x8A, 0xF4, 0x55, 0xB8, 0xF0, 0x83, 0xDD, 0x76, 0x75, 0xC3, 0xE8, 0x76, 0x59,
				0x4B, 0x9F, 0x88, 0x14, 0xB1, 0x7C, 0x48, 0xE7, 0x37, 0xE6, 0x26, 0xAD, 0xD7, 0x33, 0x49, 0xF4, 0x91, 0x3B, 0x9E, 0x39,
				0xC3, 0x9A, 0x11, 0xF0, 0xA7, 0x31, 0xA7, 0xB, 0x8A, 0xDA, 0xBA, 0x1A, 0x95, 0xB5, 0xA5, 0x86, 0x44, 0x4F, 0x7A, 0x79,
				0xE3, 0x45, 0xE5, 0x94, 0x45, 0x5F, 0x7D, 0x79, 0x5D, 0x82, 0x74, 0xE7, 0xA4, 0x93, 0xE3, 0xBD, 0xE8, 0xCB, 0xA6, 0x39,
				0xF6, 0x48, 0x8, 0xF, 0x43, 0xC9, 0x97, 0x18, 0x44, 0x87, 0x77, 0x8D, 0xE4, 0x19, 0x21, 0xE4, 0x95, 0xC2, 0x38, 0x67,
				0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4, 0x91, 0x94, 0x28, 0xA1, 0x14, 0x78, 0x54, 0xF6, 0x69, 0x29, 0xC5, 0xB2, 0x42, 0x26, 0x20, 0x92, 0xCB, 0x6D, 0x5E,
				0xC0, 0xC3, 0x9D, 0x80, 0xDC, 0xF1, 0xE1, 0x2F, 0x1E, 0xEC, 0x6C, 0x5B, 0x50, 0x57, 0xD1, 0x84, 0x7, 0x83, 0x12, 0xA1,
				0xE1, 0xFA, 0xD2, 0xE3, 0x45, 0x4F, 0xED, 0x1A, 0x4C, 0x90, 0xB, 0x7C, 0xD, 0x82, 0x1F, 0x59, 0x6F, 0x51, 0xB9, 0xEF,
				0x4A, 0x2B, 0xF8, 0x97, 0x3, 0x13, 0x8F, 0xE0, 0xC6, 0x0];
			//---------------------------------------------------------------------------
			super(dump);
			commandPop[1000] = S2C_EngineerLogin_Inner;
			commandPop[1001] = S2C_SysMessage_Inner;
			commandPop[1002] = S2C_Talk_Inner;
			commandPop[1003] = S2C_SoundMessage_Inner;
			commandPop[1004] = S2C_ImageMessage_Inner;
			commandPop[1005] = S2C_PlayerItem_Inner;
			commandPop[1006] = S2C_ClientDeley_Inner;
			commandPop[1007] = S2C_ClientTime_Inner;
			commandPop[1008] = S2C_InitGame_Inner;
			commandPop[1009] = S2C_StartUp_Inner;
			commandPop[1010] = S2C_LoadingPos_Inner;
			commandPop[1011] = S2C_UserDisconnect_Inner;
			commandPop[1012] = S2C_LinkPlayerInfo_Inner;
			commandPop[1013] = S2C_PlayerInfo_Inner;
			commandPop[1014] = S2C_setTableList_Inner;
			commandPop[1015] = S2C_RenewTable_Inner;
			commandPop[1016] = S2C_IntoTableRet_Inner;
			commandPop[1017] = S2C_InitTable_Inner;
			commandPop[1018] = S2C_ExitTableRet_Inner;
			commandPop[1019] = S2C_MutiMsg_Inner;
			commandPop[1020] = S2C_LinkBonus_Inner;
			commandPop[1021] = S2C_SomeoneGetLinkBonus_Inner;
			commandPop[1022] = S2C_EventOption_Inner;
			commandPop[1023] = S2C_LEDMessage_Inner;
			commandPop[1024] = S2C_RunBAR_Inner;
			commandPop[1025] = S2C_SubGame1RunBAR_Inner;
			commandPop[1026] = S2C_AwardMessage_Inner;
			commandPop[1027] = S2C_SubGame2RunBAR_Inner;
			commandPop[1028] = S2C_ConfirmTable_Inner;
			commandPop[1] = S2C_DEFCOMM_Inner;
			commandPop[2] = S2C_DEFPing_Inner;
			commandPop[3] = S2C_DEFPong_Inner;
		}

		override public function action(COMM:Number, ba:ByteArray):void
		{
			if (commandPop[COMM])
			{
				commandPop[COMM](ba);
			}
		}

		// ============================ C2S ====================================
		public function C2S_EngineerLogin(ID:String):void
		{
			var ba:ByteArray = makeByteArray();
			addString(ba, ID);
			pushCommand({COMM: 1000, Data: ba});
		}

		public function C2S_LoginGame(p:String):void
		{
			var ba:ByteArray = makeByteArray();
			addString(ba, p);
			pushCommand({COMM: 1001, Data: ba});
		}

		public function C2S_LoadingPos(pos:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, pos);
			pushCommand({COMM: 1002, Data: ba});
		}

		public function C2S_GetPlayerInfo():void
		{
			var ba:ByteArray = makeByteArray();
			pushCommand({COMM: 1003, Data: ba});
		}

		public function C2S_Talk(str:String):void
		{
			var ba:ByteArray = makeByteArray();
			addString(ba, str);
			pushCommand({COMM: 1004, Data: ba});
		}

		public function C2S_SoundMessage(No:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, No);
			pushCommand({COMM: 1005, Data: ba});
		}

		public function C2S_ImageMessage(No:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, No);
			pushCommand({COMM: 1006, Data: ba});
		}

		public function C2S_ClientLOG(com:int, LOG:String):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, com);
			addString(ba, LOG);
			pushCommand({COMM: 1007, Data: ba});
		}

		public function C2S_MutiMsg(No:int, Ret:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, No);
			addInt(ba, Ret);
			pushCommand({COMM: 1008, Data: ba});
		}

		public function C2S_getTableList(Type:int, PageNo:int, CheckSum:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, Type);
			addInt(ba, PageNo);
			addInt(ba, CheckSum);
			pushCommand({COMM: 1009, Data: ba});
		}

		public function C2S_IntoTable(Type:int, TableNo:int, PW:String):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, Type);
			addInt(ba, TableNo);
			addString(ba, PW);
			pushCommand({COMM: 1010, Data: ba});
		}

		public function C2S_ExitTable(KeepTable:int, PW:String):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, KeepTable);
			addString(ba, PW);
			pushCommand({COMM: 1011, Data: ba});
		}

		public function C2S_Bet(LineCount:int, LintBet:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, LineCount);
			addInt(ba, LintBet);
			pushCommand({COMM: 1012, Data: ba});
		}

		public function C2S_EventOption(EventNo:int, Option:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, EventNo);
			addInt(ba, Option);
			pushCommand({COMM: 1013, Data: ba});
		}

		public function C2S_ChooseGame(No:int):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, No);
			pushCommand({COMM: 1014, Data: ba});
		}

		public function C2S_ConfirmTable(Choose:int, Type:int, Table:int):void
		{
			var ba:ByteArray = makeByteArray();
			addByte(ba, Choose);
			addInt(ba, Type);
			addInt(ba, Table);
			pushCommand({COMM: 1015, Data: ba});
		}

		public function C2S_DEFCOMM(v1:int, v2:String):void
		{
			var ba:ByteArray = makeByteArray();
			addInt(ba, v1);
			addString(ba, v2);
			pushCommand({COMM: 1, Data: ba});
		}

		public function C2S_DEFPing():void
		{
			var ba:ByteArray = makeByteArray();
			pushCommand({COMM: 2, Data: ba});
		}

		public function C2S_DEFPong():void
		{
			var ba:ByteArray = makeByteArray();
			pushCommand({COMM: 3, Data: ba});
		}

		// ============================ S2C ====================================
		public function S2C_EngineerLogin_Inner(ba:ByteArray):void
		{
			var v1:String = loadString(ba);
			S2C_EngineerLogin(v1);
		}

		public function S2C_SysMessage_Inner(ba:ByteArray):void
		{
			var v1:String = loadString(ba);
			S2C_SysMessage(v1);
		}

		public function S2C_Talk_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:String = loadString(ba);
			S2C_Talk(v1, v2);
		}

		public function S2C_SoundMessage_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			S2C_SoundMessage(v1, v2);
		}

		public function S2C_ImageMessage_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			S2C_ImageMessage(v1, v2);
		}

		public function S2C_PlayerItem_Inner(ba:ByteArray):void
		{
			var v1:int   = loadInt(ba);
			var v2:uint  = loadUByte(ba);
			var v3:Array = loadIntArray(ba);
			var v4:Array = loadUByteArray(ba);
			S2C_PlayerItem(v1, v2, v3, v4);
		}

		public function S2C_ClientDeley_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			S2C_ClientDeley(v1, v2);
		}

		public function S2C_ClientTime_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			S2C_ClientTime(v1);
		}

		public function S2C_InitGame_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:String = loadString(ba);
			var v3:String = loadString(ba);
			S2C_InitGame(v1, v2, v3);
		}

		public function S2C_StartUp_Inner(ba:ByteArray):void
		{
			var v1:String = loadString(ba);
			S2C_StartUp(v1);
		}

		public function S2C_LoadingPos_Inner(ba:ByteArray):void
		{
			var v1:int   = loadInt(ba);
			var v2:Array = loadIntArray(ba);
			var v3:Array = loadIntArray(ba);
			S2C_LoadingPos(v1, v2, v3);
		}

		public function S2C_UserDisconnect_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			S2C_UserDisconnect(v1);
		}

		public function S2C_LinkPlayerInfo_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:int    = loadInt(ba);
			var v3:String = loadString(ba);
			S2C_LinkPlayerInfo(v1, v2, v3);
		}

		public function S2C_PlayerInfo_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:String = loadString(ba);
			S2C_PlayerInfo(v1, v2);
		}

		public function S2C_setTableList_Inner(ba:ByteArray):void
		{
			var v1:int       = loadInt(ba);
			var v2:ByteArray = loadBuffer(ba);
			//ba.writeByte(0);
			//var v2:String = loadString(ba);
			S2C_setTableList(v1, v2);
		}

		public function S2C_RenewTable_Inner(ba:ByteArray):void
		{
			var v1:int       = loadInt(ba);
			var v2:int       = loadInt(ba);
			var v3:ByteArray = loadBuffer(ba);
			S2C_RenewTable(v1, v2, v3);
		}

		public function S2C_IntoTableRet_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			var v3:int = loadInt(ba);
			S2C_IntoTableRet(v1, v2, v3);
		}

		public function S2C_InitTable_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:String = loadString(ba);
			S2C_InitTable(v1, v2);
		}

		public function S2C_ExitTableRet_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			var v3:int = loadInt(ba);
			S2C_ExitTableRet(v1, v2, v3);
		}

		public function S2C_MutiMsg_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:String = loadString(ba);
			var v3:String = loadString(ba);
			S2C_MutiMsg(v1, v2, v3);
		}

		public function S2C_LinkBonus_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			S2C_LinkBonus(v1);
		}

		public function S2C_SomeoneGetLinkBonus_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:int    = loadInt(ba);
			var v3:String = loadString(ba);
			var v4:String = loadString(ba);
			var v5:int    = loadInt(ba);
			var v6:int    = loadInt(ba);
			S2C_SomeoneGetLinkBonus(v1, v2, v3, v4, v5, v6);
		}

		public function S2C_EventOption_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			S2C_EventOption(v1, v2);
		}

		public function S2C_LEDMessage_Inner(ba:ByteArray):void
		{
			var v1:String = loadString(ba);
			var v2:int    = loadInt(ba);
			S2C_LEDMessage(v1, v2);
		}

		public function S2C_RunBAR_Inner(ba:ByteArray):void
		{
			var v1:Array = loadByteArray(ba);
			var v2:Array = loadByteArray(ba);
			var v3:Array = loadByteArray(ba);
			var v4:int   = loadInt(ba);
			var v5:int   = loadInt(ba);
			var v6:int   = loadInt(ba);
			S2C_RunBAR(v1, v2, v3, v4, v5, v6);
		}

		public function S2C_SubGame1RunBAR_Inner(ba:ByteArray):void
		{
			var v1:int   = loadByte(ba);
			var v2:Array = loadByteArray(ba);
			var v3:int   = loadByte(ba);
			var v4:int   = loadByte(ba);
			var v5:Array = loadByteArray(ba);
			var v6:Array = loadByteArray(ba);
			var v7:Array = loadByteArray(ba);
			var v8:Array = loadIntArray(ba);
			var v9:Array = loadIntArray(ba);
			S2C_SubGame1RunBAR(v1, v2, v3, v4, v5, v6, v7, v8, v9);
		}

		public function S2C_AwardMessage_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:int    = loadInt(ba);
			var v3:String = loadString(ba);
			var v4:String = loadString(ba);
			var v5:String = loadString(ba);
			S2C_AwardMessage(v1, v2, v3, v4, v5);
		}

		public function S2C_SubGame2RunBAR_Inner(ba:ByteArray):void
		{
			var v1:Array = loadByteArray(ba);
			var v2:Array = loadIntArray(ba);
			var v3:int   = loadByte(ba);
			var v4:int   = loadInt(ba);
			var v5:int   = loadInt(ba);
			S2C_SubGame2RunBAR(v1, v2, v3, v4, v5);
		}

		public function S2C_ConfirmTable_Inner(ba:ByteArray):void
		{
			var v1:int = loadInt(ba);
			var v2:int = loadInt(ba);
			var v3:int = loadInt(ba);
			var v4:int = loadInt(ba);
			S2C_ConfirmTable(v1, v2, v3, v4);
		}

		public function S2C_DEFCOMM_Inner(ba:ByteArray):void
		{
			var v1:int    = loadInt(ba);
			var v2:String = loadString(ba);
			S2C_DEFCOMM(v1, v2);
		}

		public function S2C_DEFPing_Inner(ba:ByteArray):void
		{
			S2C_DEFPing();
		}

		public function S2C_DEFPong_Inner(ba:ByteArray):void
		{
			S2C_DEFPong();
		}

		// ==================== S2C abstact function  =============================
		public function S2C_EngineerLogin(option:String):void
		{
		}

		public function S2C_SysMessage(msg:String):void
		{
		}

		public function S2C_Talk(SID:int, msg:String):void
		{
		}

		public function S2C_SoundMessage(SID:int, No:int):void
		{
		}

		public function S2C_ImageMessage(SID:int, No:int):void
		{
		}

		public function S2C_PlayerItem(SID:int, Count:uint, ItemList:Array, ItemCount:Array):void
		{
		}

		public function S2C_ClientDeley(SID:int, option:int):void
		{
		}

		public function S2C_ClientTime(Times:int):void
		{
		}

		public function S2C_InitGame(SID:int, ID:String, Option:String):void
		{
		}

		public function S2C_StartUp(Option:String):void
		{
		}

		public function S2C_LoadingPos(Total:int, SID:Array, Pos:Array):void
		{
		}

		public function S2C_UserDisconnect(SID:int):void
		{
		}

		public function S2C_LinkPlayerInfo(Pos:int, SID:int, Option:String):void
		{
		}

		public function S2C_PlayerInfo(SID:int, Option:String):void
		{
		}

		public function S2C_setTableList(Type:int, data:ByteArray):void
		{
		}

		public function S2C_RenewTable(Type:int, TableNo:int, data:ByteArray):void
		{
		}

		public function S2C_IntoTableRet(Type:int, TableNo:int, Ret:int):void
		{
		}

		public function S2C_InitTable(Type:int, Option:String):void
		{
		}

		public function S2C_ExitTableRet(Type:int, TableNo:int, Ret:int):void
		{
		}

		public function S2C_MutiMsg(No:int, Msg:String, Select:String):void
		{
		}

		public function S2C_LinkBonus(Bonus:int):void
		{
		}

		public function S2C_SomeoneGetLinkBonus(TableType:int, TableNo:int, ID:String, Name:String, BonusType:int, Point:int):void
		{
		}

		public function S2C_EventOption(EventNo:int, Option:int):void
		{
		}

		public function S2C_LEDMessage(Msg:String, Sec:int):void
		{
		}

		public function S2C_RunBAR(BarNo:Array, LineSymbols:Array, LineCount:Array, HeartCount:int, WinPoint:int, NowPoint:int):void
		{
		}

		public function S2C_SubGame1RunBAR(SelectCount:int, Select:Array, Rate:int, PlayCount:int, BarNo:Array, LineSymbols:Array, LineCount:Array, WinPoint:Array, NowPoint:Array):void
		{
		}

		public function S2C_AwardMessage(TableType:int, TableNo:int, ID:String, Name:String, Msg:String):void
		{
		}

		public function S2C_SubGame2RunBAR(cards:Array, gold:Array, card:int, position:int, total:int):void
		{
		}

		public function S2C_ConfirmTable(NewType:int, NewTable:int, OldType:int, OldTable:int):void
		{
		}

		public function S2C_DEFCOMM(com:int, p:String):void
		{
		}

		public function S2C_DEFPing():void
		{
			//C2S_DEFPong;
		}

		public function S2C_DEFPong():void
		{
		}
	}
}
